package com.example.elasticsearchhepler.entity;

import com.example.elasticsearchhepler.annotations.ESField;
import com.example.elasticsearchhepler.enums.ESAnalyzerType;
import com.example.elasticsearchhepler.enums.ESFieldType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class LogisiticsInfoModel implements Serializable {

    private static final long serialVersionUID = 700143074187411912L;
    @ESField(name = "user_name",type = ESFieldType.Text,searchAnalyzer = ESAnalyzerType.IK_MAX_WORD,analyzer=ESAnalyzerType.IK_MAX_WORD)
    private String province;

    @ESField(name = "province",type = ESFieldType.Keyword)
    private String city;

    @ESField(name = "area",type = ESFieldType.Keyword)
    private String area;

    @ESField(name = "post_code",type = ESFieldType.Keyword)
    private String postCode;

    @ESField(name = "status",type = ESFieldType.Integer)
    private String status;

    @ESField(name = "user_info",type = ESFieldType.Object,childType = UserInfoEntity.class)
    private UserInfoEntity address;
}
